
<script type="text/javascript" src="@{'/public/javascripts/jquery-1.6.4.min.js'}"></script>
<script charset="utf-8" src="@{'/public/javascripts/edit_tools/kindeditor-4.0.1/kindeditor-min.js'}"></script>
<script charset="utf-8" src="@{'/public/javascripts/edit_tools/kindeditor-4.0.1/lang/zh_CN.js'}"></script>

<script type="text/javascript">
function lan(aaa){
        $.ajax({
               type:"POST",
               url:"@{ProgramaAction.test()}",
               dataType:"json",
               data:"id="+$(aaa).val(),
               success:function(data){
               if(data[0].id != "non"){
                   var opt = "";
	               for(var i=0;i<data.length;i++){
	                  if(opt == ""){
	                    opt = "<option value="+data[i].id+">"+data[i].proName+"</option>";
	                  }else{
	                    opt += "<option value="+data[i].id+">"+data[i].proName+"</option>";
	                  }
	               }
	                 $(aaa).nextAll().remove();
	                 $(aaa).after("&nbsp;&nbsp;<select name='proId' onchange='lan(this);'><option>请选择：</option>"+opt+"</select>");
               }else{
                     $(aaa).nextAll().remove();
               }
               }
        });
 }
</script>

<script type="text/javascript">
	var editor;
	KindEditor.ready(function(K) {
		editor = K.create('textarea[id="infDet"]', {
			resizeType : 2,
			allowPreviewEmoticons : false,
			allowImageUpload : false,
			items : [
				'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
				'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
				'insertunorderedlist', '|', 'emoticons', 'image', 'link','table','map','|','source','fullscreen' ]
		});
	});
	function editor_add_html(txt){
		// 取得HTML内容
		var htmlX = editor.html();
		// 设置HTML内容
		//editor.html( htmlX + "<br>" + txt );
		//将指定的HTML内容添加到编辑区域的最后位置。
		//editor.appendHtml(txt);
		//插入内容
		editor.insertHtml(txt);
	}
</script>


<form action="@{save()}" method="post">
   #{if flash.success}
   <p><font color="red">${flash.success}</font></p>
   #{/if}
   <p>信息标题：<input type="text" name="information.infTit" value=${information.infTit}>
              <input type="hidden" name="information.id" value=${information.id}>
   </p>
   <p>信息代码：<input type="text" name="information.infCode" value=${information.infCode}></p>
   <p>请选择所属栏目：
	<select name="proId" onchange="lan(this);">
	          <option value=${information.programa?.id}>${information.programa?.proName}</option>
			#{list items:programas,as:'programa'}
			#{if information.programa.id != programa.id}
			  <option value=${programa.id}>${programa.proName}</option>
			 #{/if}
			#{/list}
		</select>
	</p>
   <p>信息详情：
            <textarea rows="10" cols="70" id="infDet" name="infDet">${information.infDet}</textarea>
   </p>
   <p><input type="submit" value="更新"></p>
</form>

















